1. Field of the Invention
The present invention relates to a packet relaying apparatus, specifically a label switching router (hereinafter occasionally abbreviated as LSR), and in particular to a packet relaying apparatus used for MPLS (Multi-Protocol Label Switching).
The MPLS is a technique being presently standardized by an MPLS working group of the IETF as a basic technique for an Intranet and an Internet backbone.
A label switching technique having characteristics of high-speed data transmission/scalability/easy traffic control is utilized for the MPLS. In the label switching, a routing process at an IP level (layer 3) and a switching process at a lower layer (layer 2) by an ATM switch, a frame relay switch, an Ethernet switch, and the like are united to perform forwarding of the layer 2 by a label assigned to a packet.
In the MPLS, a group of layer 3 packets transferred by the same method or treatment (for example, transferred on the same path and the same service class) is defined as an FEC (forwarding equivalence class), and the same label is assigned to the group of packets corresponding to the FEC.
Hereafter, the forwarding of the layer 2 can be performed to the packets to which the label is assigned by referring only to the label to determine parameters required for the forwarding of the layer 2 such as a transferring path and a service class by the FEC corresponding to the label.
The label switching router as the packet relaying apparatus serves to realize the label switching, so that how the label is assigned to the packets is important.
2. Description of the Related Art
In a connection oriented network such as an ATM or a frame relay, the xe2x80x9cconnectionxe2x80x9d can be generally used as a bidirectional connection, i.e. connection in both directions or as a unidirectional connection, i.e. connection in one direction.
Furthermore, a single connection identifier is generally assigned to the bidirectional connection and also the unidirectional connection.
In consideration of setting up paths by two independent connections in a unidirection xe2x80x9caxe2x80x9d or xe2x80x9cbxe2x80x9d in FIG. 9, the same connection identifier such as a VPI/VCI=0/33 in FIG. 9 can be generally used as the connection identifier which identifies xe2x80x9caxe2x80x9d and the connection identifier which identifies xe2x80x9cbxe2x80x9d with respect to the connection between a port 1 in FIG. 9 and an adjoining apparatus. The apparatus which can realize this method is defined as the one having a bidirectional capability with respect to the directionality.
However, when the path is set up by the unidirectional connection such as xe2x80x9caxe2x80x9d shown in FIG. 9, many prior art apparatuses set up the path even for xe2x80x9cbxe2x80x9d which may not be actually set up but only for management and which is not inherently necessary as shown in FIG. 8, in terms of hardware or management restraint. In other words, many apparatuses exist which substitute the path setting by the bidirectional connection for the unidirectional one. This is defined as an apparatus having a unidirectional capability with respect to the directionality.
It is known that an ATM switch which forms an ATM-LSR for realizing the label switching in the ATM network has a unidirectional VC capability or a bidirectional VC capability as a VC (Virtual Connection) directionality.
Also, it is known that a frame relay switch which forms a frame relay LSR (Frame Relay Label Switching Router) for realizing the label switching in the frame relay network has a unidirectional DLCI capability or a bidirectional DLCI capability as a DLCI (Data Link Connection Identifiers) directionality.
It is to be noted that the combination of the VPI and the VCI (VPI/VCI) is generally used for the label used in the label switching between adjoining ATM-LSR""s and the DLCI is generally used for the label between adjoining frame relay LSR""s.
Hereinafter, the label switching will be more specifically described with the ATM switch which forms the ATM-LSR being taken as an example.
FIG. 8 shows an ATM switch 310 having the unidirectional capability. In case of xe2x80x9cunidirectionalxe2x80x9d, normally the connection xe2x80x9cbxe2x80x9d (incoming VPI/VCI=0/34 at port 2; outgoing VPI/VCI=0/33 at port 1) is automatically set up when the connection xe2x80x9caxe2x80x9d (incoming VPI/VCI=0/33 at port 1; outgoing VPI/VCI=0/34 at port 2) is set up.
When the ATM-LSR is formed of the ATM switch 310, the incoming label 0/33 is to be switched over to the outgoing label 0/34 for a packet directed to the connection xe2x80x9caxe2x80x9d because the VPI/VCI is used as the label. Being used for the link with an adjoining ATM-LSR connected to the port 1, the incoming label 0/33 for the ATM switch 310 is an outgoing label for the adjoining ATM-LSR. Likewise, the outgoing label 0/34 is an incoming label for the adjoining ATM-LSR connected to the port 2.
In this way, the label switching assigns the label to the link having the directionality to make switching between the incoming label and the outgoing label in each of the LSR""s.
Accordingly, in the example of FIG. 8, when a label assignment is firstly directed to the connection xe2x80x9caxe2x80x9d, the connection xe2x80x9cbxe2x80x9d opposite in direction can not use the labels 0/33 and 0/34 because they have been already used for the label switching of the connection xe2x80x9caxe2x80x9d.
FIG. 9 shows an ATM switch 320 having the bidirectional capability. In this case, the connection xe2x80x9caxe2x80x9d (incoming VPI/VCI=0/33 at port 1;
outgoing VPI/VCI=0/34 at port 2) and the connection xe2x80x9cbxe2x80x9d (incoming VPI/VCI=0/35 at port 3; outgoing VPI/VCI=0/33 at port 1) can be independently set up.
When the ATM-LSR is formed of the ATM switch 320, the switching between the incoming label 0/33 and the outgoing label 0/34 is to be performed for the packet directed to the connection xe2x80x9caxe2x80x9d. Also, the switching between the incoming label 0/35 and the outgoing label 0/33 is performed for the packet directed to the connection xe2x80x9cbxe2x80x9d.
Namely, in case of the ATM switch having the bidirectional capability, a single label (0/33) can be used as an independent label for both direction links.
It is to be noted that in the label assignment between the adjoining ATM-LSR""s, one ATM-LSR normally sends a label request message to the other ATM-LSR so that a label mapping message returned back from the other ATM-LSR determines an available label. In this respect, the prior art ATM-LSR has adopted such a method that only the label assigned by itself is managed and the label notified from others is used as it is.
When the label is used for xe2x80x9cbidirectionalxe2x80x9d, there is no particular problem as to the label assignment because the adjoining ATM-LSR""s perform the label assignment (or distribution) independently of each other.
However, when the label is used for xe2x80x9cunidirectionalxe2x80x9d, there is a possibility that the label which the same router is about to assign coincides with the label which others are about to assign by the management of only the former label, so that such a label collision is required to be avoided.
Therefore, the LSR has been developed, as shown in FIG. 10, which performs the label assignment by fixedly assigning odd number labels or even number labels. Hereinafter, the operation will be described.
It is supposed that an ATM-LSR_A has the bidirectional capability and an ATM-LSR_B has the unidirectional capability in FIG. 10.
The ATM-LSR_A sends a hello message including an LDP identifier (=1) for identifying itself to the adjoining ATM-LSR_B (at step S11). The ATM-LSR_B which has received the identifier returns a hello message including an LDP identifier (=2) for identifying itself to the ATM-LSR_A (at step S12).
It is to be noted that the format of a general LDP message is as shown in FIG. 11, and the message is composed of the fields of a xe2x80x9cUxe2x80x9d bit, a message type, a message length, a message ID, an essential parameter, and an optional parameter. The message whose type in FIG. 11 is xe2x80x9c0xc3x970100xe2x80x9d is the hello message shown in FIG. 12A, including the LDP identifier in the field of the optional parameter.
The ATM-LSR_A sends an initialization message including the information of xe2x80x9creceiving LDP identifier (=2)xe2x80x9d, xe2x80x9clabel available rangexe2x80x9d, and xe2x80x9cdirectionality (=bidirectional)xe2x80x9d to the ATM-LSR_B (at step S13), while the ATM-LSR_B similarly returns an initialization message including xe2x80x9creceiving LDP identifier (=1)xe2x80x9d, xe2x80x9clabel available rangexe2x80x9d, and xe2x80x9cdirectionality (=unidirectional)xe2x80x9d to the ATM-LSR_A (at step S14).
The logical multiplication of mutual label available ranges is now obtained at both LSR""s to determine the label available ranges. In addition, since the ATM-LSR_B is xe2x80x9cunidirectionalxe2x80x9d, the directionality becomes xe2x80x9cunidirectionalxe2x80x9d.
The message whose type is xe2x80x9c0xc3x970200xe2x80x9d in. FIG. 11 is the initialization message, its format being as shown in FIG. 12B. An ATM session parameter shown in FIG. 12C is prescribed in the optional parameter field of FIG. 12B. In FIG. 12C. xe2x80x9cDxe2x80x9d bit shows a VC directionality, and the label available range (the maximum and the minimum value respectively of VPI and VCI) is prescribed in ATM label range component fields.
In the LDP identifiers exchanged between both LSR""s in the above-mentioned (I), the LDP identifier of the ATM-LSR_A is smaller, than that of the ATM-LSR_B. Therefore, the labels assigned to the -ATM-LSR_A assume even numbers, and those to the ATM-LSR_B assume odd numbers.
Namely, when the ATM-LSR_A uses a label, it sends the label request message to the ATM-LSR_B (at step S15), and is assigned even number labels by the label mapping message sent from the ATM-LSR_B (at step S16).
To the contrary, when the ATM-LSR_B uses a label, it sends the label request message to the ATM-LSR_A (at step S17), and is assigned odd number labels by the label mapping message sent from the ATM-LSR_A (at step S18).
It is to be noted that the message whose type in FIG. 11 is xe2x80x9c0xc3x970402xe2x80x9d is the label request message, its format being shown in FIG. 13B. In addition the message whose type in FIG. 11 is xe2x80x9c0xc3x970401xe2x80x9d is the label mapping message, its format being shown in FIG. 13A.
As mentioned above, the prior art LSR fixedly assigns even number labels or odd number labels to the adjoining LSR""s when the directionality is xe2x80x9cunidirectionalxe2x80x9d. For this reason, when there is an unbalanced occurrence of label requests between the adjoining LSR""s, the situation occurs where irrespective of an open label on one side it can not be used on the other side, resulting in a decreased label availability (usage efficiency).
Also, as shown in FIGS. 14A and 14B, when a network N1 on the transmitting side is connected to a network N2 on the receiving side by an MPLS network N3 composed of a plurality of LSR""s, following problems arise:
FIG. 14A shows the case where all of the LSR""s (LSR10-LSR50) in the MPLS network N3 are xe2x80x9cunidirectionalxe2x80x9d. Expressing a forwarding equivalence class showing a packet flow from the network N1 on the transmitting side to the network N2 on the receiving side by an FEC_Af (N1xe2x86x92N2), an LSP (Label Switched Path) which is a path corresponding to the packet flow is set up in the order of LSR10xe2x86x92LSR30xe2x86x92LSR40xe2x86x92LSR50 as an LSP_A1.
At this time, since the LSR10, the LSR30, the LSR40, and the LSR50 are xe2x80x9cunidirectionalxe2x80x9d, as mentioned above, an LSP_B1 showing the same path as the LSP_A1 opposite in direction is automatically set up in the order of LSR50xe2x86x92LSR40xe2x86x92LSR30xe2x86x92LSR10. The LSP_B1 corresponds to a forwarding equivalence class FEC-Bf (N2xe2x86x92N1) which shows the packet flow when the network N2 is a transmitter and the network N1 is a receiver. However, due to the characteristic of the prior art unidirectional LSR, the LSP_B1 can not be used.
Also, FIG. 14B shows the case where the unidirectional LSR (LSR10, LSR20, LSR50) and the bidirectional LSR (LSR30 and LSR40) exist together in the MPLS network N3.
In the same way as FIG. 14A supposing that the forwarding equivalence class showing the packet flow from the network N1 which is a transmitter to the network N2 which is a receiver is the FEC-Af (N1xe2x86x92N2), the LSP_A1 which is the LSP corresponding to the FEC-AF is set up in the order of the LSR10xe2x86x92LSR30xe2x86x92LSR40xe2x86x92LSR50.
At this time, since the LSR10 and the LSR50 are xe2x80x9cunidirectionalxe2x80x9d, LSR30xe2x86x92LSR10 and LSR50xe2x86x92LSR40, which are parts of the LSP_B1 (LSR50xe2x86x92LSR40xe2x86x92LS30xe2x86x92LSR10) which shows the same path as the LSP_A1 opposite in direction, are automatically set up. In the same way as FIG. 14A, the LSP_B1 corresponds to the forwarding equivalence class FEC_Bf (N2xe2x86x92N1) which shows the packet flow when the network N2 is a transmitter and the network N1 is a receiver. However, the LSR50xe2x86x92LSR40 and the LSR30xe2x86x92LSR10 automatically set up can not be used.
Namely, when the label is assigned to the forwarding equivalence class FEC_Bf (N2xe2x86x92N1), the LSR10, the LSR30, the LSR40, and the LSR50 in FIGS. 14A and 14B must use a label different from that of the forwarding equivalence class FEC_M (N1xe2x86x92N2), which is disadvantageous in that the label availability decreases.
It is accordingly an object of the present invention to provide a packet relaying apparatus which prevents a collision of labels and which improves a label availability as much as possible.
[1] To achieve the above-mentioned object, a packet relaying apparatus for communicating with an adjoining packet relaying apparatus, according to the present invention comprising; a label distribution protocol processor for determining an available range and a directionality of a label by a negotiation with the adjoining packet relaying apparatus to assign the label to a forwarding equivalence class, a label management portion for managing the label assigned by the label distribution protocol processor, and a switch controller for performing a label switching based on the assignment, the label distribution protocol processor performing a label assignment so that the labels which the label management portion of the processor manages and which the label management portion of the adjoining packet relaying apparatus manages are assigned in mutually reversed orders within the label available range when the directionality is determined to be unidirectional.
Namely, when the directionality is determined to be xe2x80x9cunidirectionalxe2x80x9d, the label management portion manages not only the label assigned by itself but also the label assigned by an adjoining LSR. Namely, the label assignment is performed within the label available range in such an order opposite to the adjoining LSR that when the adjoining LSR assigns the labels from a smaller number, the LSR itself assigns the labels from a larger number.
This enables the label availability to be improved even when there is an unbalance occurrence of a label request between the adjoining LSR""s.
[2] Also, a packet relaying apparatus according to the present invention, in the above-mentioned present invention [1], the label management portion may manage the labels assigned by itself and assigned by the adjoining packet relaying apparatus by using different management tables.
Namely, one management table may manage e.g. smaller number labels assigned by itself, and the other management table may manage larger number labels assigned by the adjoining station.
[3] Also, a packet relaying apparatus according to the present invention, in the above-mentioned present invention [1], the label distribution protocol processor may, use an incoming label and an outgoing label assigned to a unidirectional forwarding equivalence class respectively as an outgoing label and an incoming label when assigning the labels to another forwarding equivalence class opposite in direction to the former forwarding equivalence class.
Namely, when assigning xe2x80x9cL-inxe2x80x9d as the incoming label and xe2x80x9cL-outxe2x80x9d as the outgoing label to the unidirectional forwarding equivalence class, the label distribution protocol processor may assign xe2x80x9cL-inxe2x80x9d as the outgoing label and xe2x80x9cL-outxe2x80x9d as the incoming label to the forwarding equivalence class having the same path as the former forwarding equivalence class but opposite in direction.
[4] Also, a packet relaying apparatus according to the present invention, in the above-mentioned present invention [3], the label management portion may manage three of open, closed, and reserved statuses as label available statuses.
Namely, the label management portion may manage the reserved status in addition to the open and closed statuses as the label available statuses. By this management, when xe2x80x9cL-inxe2x80x9d is assigned as the incoming label, and xe2x80x9cL-outxe2x80x9d is assigned as the outgoing label to the unidirectional forwarding equivalence class. xe2x80x9cL-inxe2x80x9d and xe2x80x9cL-outxe2x80x9d may be reserved as the labels assigned to the forwarding equivalence class opposite in direction to the former forwarding equivalence class. Accordingly, when there is a label assignment request to the forwarding equivalence class opposite in direction, xe2x80x9cL-inxe2x80x9d may be assigned as the outgoing label and xe2x80x9cL-outxe2x80x9d may be assigned as the incoming label.
[5] Also, a packet relaying apparatus according to the present invention, in the above-mentioned present invention [1], when the label distribution protocol processor assigns an incoming label and an outgoing label to the unidirectional forwarding equivalence class, the labels may be simultaneously assigned to another forwarding equivalence class opposite in direction to the former forwarding equivalence class respectively as the outgoing label and the incoming label.
Namely, when the label distribution protocol processor assigns xe2x80x9cL-inxe2x80x9d as the incoming label and xe2x80x9cL-outxe2x80x9d as the outgoing label to the unidirectional forwarding equivalence class, xe2x80x9cL-inxe2x80x9d and xe2x80x9cL-outxe2x80x9d may be simultaneously assigned respectively as the outgoing label and the incoming label to the forwarding equivalence class opposite in direction.
[6] Also, a packet relaying apparatus according to the present invention, in the above-mentioned present invention [1], the label distribution protocol processor may regard a unidirectional forwarding equivalence class and another forwarding equivalence class opposite in direction to the former forwarding equivalence class as a single bidirectional forwarding equivalence class and assign the labels to the bidirectional forwarding equivalence class.
Namely, the label distribution protocol processor may treat the unidirectional forwarding equivalence class and the forwarding equivalence class opposite in direction to the former forwarding equivalence class as a single bidirectional forwarding equivalence class, and may assign xe2x80x9cL-outxe2x80x9d as the outgoing label when xe2x80x9cL-inxe2x80x9d is the incoming label and may assign xe2x80x9cL-inxe2x80x9d as the outgoing label when xe2x80x9cL-outxe2x80x9d is the incoming label, to the bidirectional forwarding equivalence class. This management enables the label availability to be much more improved.
[7] Also, a packet relaying apparatus according to the present invention, in the above-mentioned present invention [1], a combination of VPI and VCI may be used as the label and the switch controller may control an ATM switch.
[8] Also, a packet relaying apparatus according to the present invention, in the above-mentioned present invention [1], DLCI may be used as the label and the switch controller may control a frame relay switch.